Skip to main content

All Questions

Tagged with
-1votes
0answers
22views

How to properly handle and display ASP.NET MVC API validation errors in AJAX responses? [closed]

I’m implementing AJAX-based teacher updates in an ASP.NET MVC 5 application with server-side validation. While my API correctly returns validation errors (e.g., 400 Bad Request with ModelState), I can’...
Oyemahak's user avatar
0votes
0answers
95views

HttpPost does not redirect to View

I have a button that opens a modal that I use to edit a name. <button type="button" data-toggle="modal" OnClick="showInPopup('@Url.Action("EditName", &...
Cory Battles's user avatar
0votes
2answers
51views

My ajax post request doesn't work in my ASP.NET MVC project

I'm trying to make a request to controller but it doesn't work. The first console.log() shows the correct id, so I think I passed it right in the html button. The id parameter is always 0 when it ...
Pedro Henrique Miranda's user avatar
0votes
1answer
71views

accessing c# web assembly from javascript in .net MVC [duplicate]

I need to access some c# code from javascript in MVC ,NET (not blazor). I have the below. This is very specific to .NET and MVC stack and not a generic ajax question like another one in stack overfow. ...
PanLondon's user avatar
1vote
0answers
63views

Unable to execute Action in another controller using AJAX call

I am trying to execute code in my MVC application that in my web application, a user when logging in, will have to verify their phone number first before they can click on any menus in my application. ...
ray805's user avatar
0votes
1answer
72views

how do i return the json object of my ajax GET request to an API in Asp.net MVC

Ok hi. I'm having a lot of problems with a project im building. I want to use Ajax to make a request to the Google.Books api so I can make book searches from my website. Its a Asp.net MVC project. I'm ...
état de choses's user avatar
-1votes
1answer
40views

.Net Web Controller JsonResult Function return a html code instead of Json format when calling an api

i cannot find any specific issue in google so better post it here, hope there is some solutions. for more than a week, i am facing this issue. I have a function in my web controller like this public ...
Maing Gundul's user avatar
-1votes
1answer
42views

AJAX calls based on dropdown selection

I need to fetch the data for a drop down control from the server. Then I need to fetch more data based on what I select in the drop down. Could somebody explain it by using AJAX, something like this: $...
Vengat Ramanan's user avatar
1vote
1answer
34views

Kendo Grid add and array of element to to a table with Javascript

I have a form to add admin user to a site. Multiple users can be added at once. OnSuccess, I need to append the users to a Kendo Grid (Table). How can I append all three users when the AJAX response ...
esoteric's user avatar
0votes
2answers
100views

How to get the property's name of an object using jQuery?

this is my form: <form id="inventoryForm" action="/ManderalMatrix/AddManderalInventory" class="reactiveToButton"> <div class="row" style="...
Ali.F's user avatar
0votes
0answers
18views

Collapsible page to prevent reloading and staying the same when I update data

I have a collapsible webpage in a multiproject mvc solution. I have an js code: `$(document).on("click", ".open-AddSendDialog", function () { var myBookId = $(this).data('id'); ...
AMIRHOSSEIN OVEISSI's user avatar
0votes
0answers
89views

ASP.NET MVC (blocked:csp) error when running in local

I am getting the (blocked:csp) error in my Chrome browser when my app. I have the headers set up like this: HttpContext.Current.Response.Headers.Add("X-Content-Security-Policy", "...
Wasyster's user avatar
0votes
4answers
117views

Ajax post call to Controller method keeps saying 400 Bad Request

I am trying to make an Ajax post call to a method in my HomeController but I keep getting 400 Bad Request error. This is the ajax call $.ajax({ url: '/home/findareacode', contentType: '...
Afz's user avatar
  • 77
0votes
1answer
201views

Properly reload and reformat a Bootstrap Popover after Loading Data with ajax

Let me state first of all that there are a lot of articles out there asking about simply loading an Ajax call's data into a Bootstrap 4.0 popover; this question regards a slightly different topic. The ...
Freerey's user avatar
0votes
2answers
56views

Problem in sending data to the controller through Ajax in ASP.NET MVC

I use this foreach: foreach (var item2 in RItem.GetChildItems(item.ID_Ca)) { <div id="@idc" class="accordion-collapse collapse" aria-labelledby="headingTwo2" ...
Hamed Javadi's user avatar

153050per page
close